package com.ygy.entity;

import java.math.BigDecimal;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import java.time.LocalDateTime;
import java.io.Serializable;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * <p>
 * 订单表
 * </p>
 *
 * @author Ye
 * @since 2024-03-14
 */
@Data
@EqualsAndHashCode(callSuper = false)
public class Orders implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 订单ID，主键自增
     */
    @TableId(value = "order_id", type = IdType.AUTO)
    private Integer orderId;

    /**
     *  买家ID
     */
    private Integer userId;

    //卖家id
    private Integer sellId;

    //商品图片
    private String picture;

    private String productName;

    private  String orderNumber;//创建订单编号

    private  Integer productId;

    /**
     * 订单总价
     */
    private BigDecimal totalPrice;

    /**
     * 收货地址
     */
    private String address;

    /**
     * 订单状态
     */
    private String status;
    //买家是否评价
    private String buyerEvaluated;
    //卖家是否评价
    private String sellerEvaluated;

    /**
     * 创建时间
     */
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createdAt;

    /**
     * 更新时间
     */
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime updatedAt;


}
